package cn.wlj.mq.simple;

import org.springframework.amqp.rabbit.annotation.RabbitListener;
import org.springframework.stereotype.Component;

/**
 * @ClassName Receiver
 * @Description TODO
 * @Author WLJ
 * @Date 2024/1/18 20:34
 * @Version 1.0
 */
@Component
public class Receiver {

    @RabbitListener(queues = SimpleMqConfig.QUEUE_NAME)
    public void listener(String message) {
        System.out.println(SimpleMqConfig.QUEUE_NAME + "监听到消息：【" + message + "】");
    }
}
